// all error messages
const ERROR_MESSAGE = {
    // unexpected
    $UNEXPECTED: '服务异常，请稍后重试！',
    // login
    LOGIN_WRONG_EMAIL_PASSWORD_PAIR: '用户名或密码不正确，请重新输入！',
    LOGIN_USER_IN_LOCK: '对不起，您的账户已被锁定！',
    // phone
    PHONE_QUERY_NOT_FOUND: 'Sorry, the phone you queryed can not be found!',
    PHONE_UPDATE_NOT_FOUND: 'Sorry, the phone you updated can not be found!',
    PHONE_DELETE_NOT_FOUND: 'Sorry, the phone you deleted can not be found!',
    //无法获取respBody.message.content的值
    RESPONSE_ERROR :"对不起，服务异常！",
    SESSION_TIMEOUT :"会话超时，请重新登录！",
    "-1":"对不起，无法连接服务器"
};

class ErrorService {
    getErrorMessage (errorCode) {
        return ERROR_MESSAGE[errorCode] || ERROR_MESSAGE.$UNEXPECTED;
    }
}

export default ErrorService;
